package com.das.mechanic_base.utils;

import android.util.Log;

import com.das.mechanic_base.BuildConfig;


/**
 * Created by chensi on 2018/5/10.
 */

public class X3LogUtils {
    public static final boolean DEBUG = BuildConfig.allowLog;

    public static void e(Object o) {
        if (DEBUG) {
            Log.e("TAG", "打印：------      " + o.toString());
        }
    }

    public static void i(String response) {

        if (DEBUG) {
            if (response.length() > 4000) {
                for (int i = 0; i < response.length(); i += 4000) {
                    if (i + 4000 < response.length())
                    {
                        Log.i("xxx", "response第一段log===" + response.substring(i, i + 4000));
                    }
                    else {
                        Log.i("xxx", "response第二段log===" + response.substring(i, response.length()));
                    }
                }
            } else {
                Log.i("xxx", "response===" + response);
            }
        }
    }

    public static void e(int i) {
        if (DEBUG) {
            Log.e("TAG", "打印：------      " + i);
        }
    }

    public static void e(float i) {
        if (DEBUG) {
            Log.e("TAG", "打印：------      " + i);
        }
    }

    public static void e(boolean b) {
        if (DEBUG) {
            Log.e("TAG", "打印：------      " + b);
        }
    }
}
